package com.simple.business.mapper.user;

import com.github.zuihou.base.mapper.SuperMapper;
import com.simple.business.domain.entity.user.Baby;
import com.simple.business.domain.vo.BabyVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @desc
 * @Author SimpleTree
 * @Date 2025/2/10 14:34
 **/
@Repository
public interface BabyMapper extends SuperMapper<Baby> {


    @Select("select * from c_baby cb where deleted = false and id in (select baby_id from c_user_baby where user_id = #{userId})")
    List<BabyVO> queryBabies(@Param("userId") Long userId);
}
